package com.lcxw.hxzbapi.service;

import com.lcxw.hxzbapi.dao.mapper.YwpdConsumeMapper;
import com.lcxw.hxzbapi.entity.pojo.YwpdConsume;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;

@Component
public class YwpdConsumeService {

    @Resource
    YwpdConsumeMapper ywpdConsumeMapper;

    public int insert(YwpdConsume ywpdConsume) {
        return ywpdConsumeMapper.insert(ywpdConsume);
    }

    public YwpdConsume selectByUserId(Long userId) {
        return ywpdConsumeMapper.selectByUserId(userId);
    }

    public Integer selectConsumeByUserId(Long userId) {
        return ywpdConsumeMapper.selectConsumeByUserId(userId);
    }

    public int updateConsumeByUserId(Integer consume, Long userId) {
        return ywpdConsumeMapper.updateConsumeByUserId(consume, userId);
    }

    public int deleteByUserId(Long userId) {
        return ywpdConsumeMapper.deleteByUserId(userId);
    }

}
